/**
 * Copyright (C), 2015, 上海赛可电子商务有限公司
 * Author:   张禀奇
 * Date:     2015-4-28
 * lever:    page
 * Description: 详情页评论js
 */

;(function($,window) {
	var imgEle = $('.minimg-box'),
		imgBigEle = $('.image-detail-box');
		
	commentList = {
			
		init:function(){
			
			//查看大图 
			this.showBigImg();
			
		},
		showBigImg:function(){
			imgEle.on('click',function(){
				var _this = $(this),
					_num =  _this.index(),
					//_imgDetail = _parent.find('.comment-info-image-detail'),
					//_imgEle = _parent.find('.minimg-box'),
					_imgBig = imgBigEle.find('.img-big');
				
				if(_this.hasClass('minimg-sel')){
					return false;
				};
				
				imgEle.removeClass('minimg-sel');
				_imgBig.hide();
				
				_this.addClass('minimg-sel');
				_imgBig.eq(_num).show();
				
			});
		}
	};
	
	commentList.init();
	
})(jQuery,window);

